package ex.datastream.functions.function;

import ex.vo.WordWithCount;
import org.apache.flink.api.common.functions.ReduceFunction;

public class ReduceFunc01 implements ReduceFunction<WordWithCount> {
    @Override
    public WordWithCount reduce(WordWithCount a, WordWithCount b) throws Exception {
        return new WordWithCount(a.getWord(), a.getCount() + b.getCount());
    }
}
